﻿using Client.Framework.Message;
using Client.Model;
using Client.Util;
using Google.Protobuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Client.Message.Request
{
    class LoginReq : RequestBaseMessage
    {
        public LoginReq(int msgId) : base(msgId)
        {
        }

        public string Username { get; set; }
        public string Password { get; set; }


        public override byte[] Serialize()
        {
            RequestLogin msg = new RequestLogin
            {
                Username = Username,
                Password = MD5Util.MD5Encrypt(Password)
            };
            return msg.ToByteArray();
        }
    }
}
